package com.yao.seckill.web.controller;

import com.yao.seckill.core.SeckillResponse;
import com.yao.seckill.web.utils.RedisUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Copyright (C), 2022-2022, 姚兵
 * Author: 32210
 * Date: 2022/9/16 17:59
 * FileName: RedisController
 * Description: redis
 */

@RestController
@RequestMapping("redis")
public class RedisController {

    @Autowired
    private RedisUtils redisUtils;
    @RequestMapping("add")
    public SeckillResponse add(String key,String value){
        redisUtils.add(key,value);
        return SeckillResponse.success();
    }
}
